<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tests</title>
<link rel="stylesheet" type="text/css" href="resources/css/style.css" />
<link rel="stylesheet" type="text/css" href="resources/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="resources/effects/animations.css">

</head>
<body>
	<jsp:include page="parts/navigation.jsp"></jsp:include>

	<script type="text/javascript" src="resources/effects/slideup.js"></script>

	<div class="list-group text-center slideUp" id="testsList">
		<a href="testsPage" class="list-group-item disabled text-center"> <label>List of tests: </label></a>

		<c:forEach var="t" items="${tests}">
			<%-- <a href="" class="list-group-item" onclick="showInfoTest(${t.id})">${t.name}</a> --%>
			<%-- <button class="list-group-item" onclick="showInfoTest(${t.id})">${t.name}</button> --%>

			<span class="list-group-item" onclick="showInfoTest('${t.name}', '${t.description}', ${t.id});">${t.name}</span>



		</c:forEach>
	</div>

	<div class="panel panel-default slideUp" id="testInfo">
		<div class="panel-heading text-center">
			<label id="labelTName"></label>
		</div>
		<div class="panel-body">
			<label id="labelTDesc"></label>
		</div>

		<div class="col-xs-6 text-left">
			<a href="testsPage">
				<button class = "button button-border-action button-pill"type="submit">Back to tests</button>
			</a>
		</div>
		<c:if test="${not empty user}">
			<div class="col-xs-6 text-right">

				<button class = "button button-border-primary button-pill" onclick="take();">Take the test</button>

			</div>
		</c:if>
	</div>






</body>
</html>